/*
 * PublicRandom.h
 *
 *  Created on: 2016-12-6
 *      Author: root
 */

#ifndef PUBLICRANDOM_H_
#define PUBLICRANDOM_H_
#include"PublicTool.h"
#include"PublicThread.h"
#include<vector>
//IP队列
//限本类 不对外
typedef std::vector<std::string>IPLIST;
//将set队列中的数据进行随机排序
class PublicRandom{
    IPLIST m_list;
    PublicLock m_List_Mutex;
private:
void Lock();
void UnLock();
public:
    PublicRandom();
    ~PublicRandom();
//插入一组数
void  InsertSetList(SETIPLIST list);
//插入一个数值
void  PushList(std::string member);
//同PushList
void  insert(std::string member);
//移除一个数值
std::string  PopList();
//查找是否在队列中
bool find(std::string member);
//是否为空
bool  Empty();
//同Empty
bool  empty();
size_t size();
};
#endif /* PUBLICRANDOM_H_ */
